//
//  MYY_VisitiorHeaderView.m
//  meiyinxiang
//
//  Created by 陈李飞 on 2017/10/25.
//  Copyright © 2017年 hbjApple. All rights reserved.
//

#import "MYY_VisitiorHeaderView.h"
#import "MYY_Me_Macro.h"


@interface MYY_VisitiorHeaderView()
@property(nonatomic, strong) UILabel *nameView;
@property(nonatomic, strong) UIView *seperatorView;

@end



@implementation MYY_VisitiorHeaderView
-(id)init
{
    self = [super init];
    
    if (self) {
        self.backgroundColor =[UIColor whiteColor];
        [self addSubview:self.nameView];

        [self addSubview:self.seperatorView];
        [self.nameView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).with.offset(20);
            make.centerY.equalTo(self);
           
        }];
      
        
        [self.seperatorView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.nameView);
            make.bottom.right.equalTo(self);
            make.height.equalTo(@0.5);
        }];
    }
    
    return self;
}


#pragma mark - property


- (UILabel *)nameView
{
    if (_nameView == nil) {
        _nameView = [UILabel new];
        _nameView.backgroundColor = [UIColor clearColor];
        _nameView.numberOfLines = 1;
        _nameView.textColor = MYYtitleColor;
        _nameView.font = [UIFont systemFontOfSize:14.0];
       // _nameView.text = @"收藏";
    }
    return _nameView;
}


- (UIView *)seperatorView
{
    if (_seperatorView == nil) {
        _seperatorView = [UIView new];
        _seperatorView.backgroundColor =MYYlineColor;
    }
    return _seperatorView;
}
-(void)nameStr:(NSString *)nameStr{
    _nameView.text =nameStr;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
